package com.tjtt.tdm.system.bean;


/**
 * liangjy
 * 
 * @author MyEclipse Persistence Tools
 */
public class Role extends AbstractRole implements java.io.Serializable{

	// Constructors
    private String roleLabelName;
	/** default constructor */
	public Role() {
	}

	/** minimal constructor */
	public Role(Long roleid) {
		super(roleid);
	}

	/** full constructor */
	public Role(Long roleid, String rolename, String rolelabel,
			String roledesc, Long parentid,String userid,String username) {
		super(roleid, rolename, rolelabel, roledesc, parentid, userid, username);
	}
	public String getRoleLabelName() {			
			// 3-故障；2-报废；1-可用
			if("ROLE_SYSADMIN".equals(this.getRolelabel())){
				roleLabelName = "系统管理员";
			}else if("ROLE_ADMIN".equals(this.getRolelabel())){
				roleLabelName = "用户管理员";
			}else if("ROLE_OPERATOR".equals(this.getRolelabel())){
				roleLabelName = "操作员";
			}else if("ROLE_MAINTENANCE".equals(this.getRolelabel())){
				roleLabelName = "研究员";
			}
		return roleLabelName;	
	}	
	public String getId()
	{
		String roleId= super.getRoleid().toString();
		roleId="R_"+roleId;
		return roleId;
	}
	
	public void setId(){
		
	}

	public String getRoleId(){
		String roleId= super.getRoleid().toString();
		return roleId;
	}
	public String getName()
	{
		return super.getRolename();
	}

	public String getType()
	{
		return "candidate";
	}

}
